package com.example.manager.service;

import com.example.manager.entity.*;
import com.example.manager.utils.borrowPageBean;
import com.example.manager.utils.followPageBean;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface IBookService {
    Integer getAllBookSize();

    PageBean getBookByPage(Integer currentpage, Integer pageSize);

    void delBook (Integer bookid);

    Book findBookById(int bookid);

    Integer addBook(Book book);

    void editBook(Book book);

    PageBean findBook(String search, Integer pageSize);

    void borrowBook(Borrow borrow);
    void backBook(Integer bookid);

    borrowPageBean getBorrowBooks(Integer username,Integer currentpage, Integer pageSize);

    borrowPageBean getBorrowBooks1(Integer currentpage, Integer pageSize);

    followPageBean getFollowBooks(Integer username, Integer currentpage, Integer pageSize);

    void followBook(Follow follow);

    void delFollowBook(Integer bookid);

    List checkFollowBooks(Integer ussername);
}
